Class AbstractGenerator

Summary

Fully Qualified Name: Laminas\XmlRpc\Generator\AbstractGenerator
Implements: GeneratorInterface

Description

Abstract XML generator adapter

Methods

Name Description Defined By
__construct() Construct new instance of the generator AbstractGenerator
__toString() Returns XML without document declaration AbstractGenerator
closeElement() End of an XML element AbstractGenerator
flush() Returns the XML as a string and flushes all internal buffers AbstractGenerator
getEncoding() Return encoding AbstractGenerator
openElement() Start XML element AbstractGenerator
setEncoding() Set XML encoding AbstractGenerator
stripDeclaration() Removes XML declaration from a string AbstractGenerator

Method Details

__construct()

Construct new instance of the generator

Parameter Name Type Description
$encoding string XML

Returns:

__toString()

Returns XML without document declaration

Returns: string

closeElement()

End of an XML element

Method marks the end of an XML element

Parameter Name Type Description
$name string XML

Returns: \AbstractGenerator Fluent interface

flush()

Returns the XML as a string and flushes all internal buffers

Returns: string

getEncoding()

Return encoding

Returns: string

openElement()

Start XML element

Method opens a new XML element with an element name and an optional value

Parameter Name Type Description
$name string XML
$value string Optional

Returns: \AbstractGenerator Fluent interface

setEncoding()

Set XML encoding

Parameter Name Type Description
$encoding string

Returns: \AbstractGenerator

stripDeclaration()

Removes XML declaration from a string

Parameter Name Type Description
$xml string

Returns: string

Top